function collect_same_elements(collection_a, collection_b) {
  var arr=[];
  var b=[];
  let c=(collection_b+'').split(',');
  // for(let item of collection_b){
  //   arr.push(item);
  // }
  console.log(c);
  for(let s1=0;s1<collection_a.length;s1++){
    for(let s2=0;s2<c.length;s2++){
      if(collection_a[s1]==c[s2]){
                  b.push(collection_a[s1]);
      }
    }
  }
  console.log(b);
  return b; //在这里写入代码
}

module.exports = collect_same_elements;
